From 1bcc1113074a6a39b745232c7dd43491cbdfc955 Mon Sep 17 00:00:00 2001 From: "robertlipe@gmail.com" Date: Sun, 25 Aug 2013 20:53:40 +0000 Subject: [PATCH] Fix use-after-read that I just introduced in gpx.cc git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@4572 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/gpx.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gpsbabel/gpx.cc b/gpsbabel/gpx.cc index dc2689dab..852504ddd 100644 --- a/gpsbabel/gpx.cc +++ b/gpsbabel/gpx.cc @@ -1137,8 +1137,7 @@ gpx_end(const QString& el) // FIXME: this code seems to rely on atoi() parsing 3d and 2d as 3 and 2 // which toInt() doesn't do. //wpt_tmp->fix = (fix_type)(cdatastr.toInt() - 1); - const char *t = CSTR(cdatastr); - wpt_tmp->fix = (fix_type)(atoi(t) - 1); + wpt_tmp->fix = (fix_type)(atoi(CSTR(cdatastr)) - 1); } if (wpt_tmp->fix < fix_2d) { if ((cdatastr.compare("none"), Qt::CaseInsensitive) == 0) { -- 2.30.2